<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>Multiple Injection</title></head>

<body>
<h3>Overview</h3>

<p>This is where a component has is a blend of one or more of
    Constructor, Setter, Method, Annotated Field etc:</p>

<div class="source">
<pre>public class Apple {
 private Orange orange;
 private Pear pear;
 @Inject
 private Banana banana;
 public inject(Orange orange) {
 this.orange = orange;
 }
 public void inject(Pear pear) {
 this.pear = pear;
 }
 // other methods
}</pre>
</div>
<h3>Usage</h3>

<div class="source">
<pre>pico = new DefaultPicoContainer(new MultiInjection();
pico.addComponent(Apple.class);
// etc
Apple apple = pico.getComponent(Apple.class);</pre>
</div>
<p>&nbsp;In the case above, Orange comes in through the
    constructor,
    Pear by method injection and Banana is via Annotated Field Injection.</p>

<p>The component factory for this is <strong>MultiInjection</strong>.</p>

</body>
</html>